#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#

class Foo(object):
    def __init__(self, name, age, sex):
        self.name = name
        self.age = age
        self.sex = sex


# 得到一个特殊的对象，该对象就是专门用来访问父类中的属性
class Bar(Foo):
    def __init__(self, name, age, sex, level):
        # super().__init__(name, age,sex)
        super(Bar, self).__init__(name, age,sex)  # 完整写法
        self.level = level

b = Bar("xiong", 100, "male", 1)
print(b.__dict__)
